package com.byxy.service.impl;

import java.util.List;

import javax.annotation.Resource;
import javax.transaction.Transactional;

import org.hibernate.criterion.DetachedCriteria;
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Restrictions;
import org.springframework.stereotype.Service;

import com.byxy.dao.ProductDao;
import com.byxy.entity.Product;
import com.byxy.service.ProductService;
@Service
@Transactional
public class ProductServiceImpl implements ProductService {
	@Resource
	private ProductDao productDao;
	// 首页上热门商品查询
	@Override
	public List<Product> findHot() {
	
		List<Product> list=productDao.findhot();
		return list;
	}
	@Override
	public List<Product> findNew() {
		List<Product> list=productDao.findNew();
		return list;
	}
	@Override
	public Product findByid(Integer id) {
		// TODO Auto-generated method stub
		return productDao.getById(id);
	}

}
